﻿
CREATE PROCEDURE [dbo].[proc_Department_GetList_Company_news]
	(
	@CompanyId VARCHAR(100)
	)
AS
	Select
	Id,
	ParentId,
	DName,
	Sort,
	CompanyId,bmbh,
	IsNull(ProtectCount,0) as ProtectCount,
	IsNull(ProtectDays,0) as ProtectDays,
	IsNull(ApplyCount,0) as ApplyCount
	From Department Where substring(bmbh,1,LEN(@CompanyId))=@CompanyId Order by Sort
	RETURN
